In the field of data processing, computer systems typically comprised a single hardware platform, a single operating system and software applications. The hardware platform would comprise a single processing device, such as a microprocessor, connected to volatile memory, input device(s), output device(s) and a permanent or semi-permanent storage device, such as a so-called hard drive. The operating system would be loaded into the hardware platform and executed in order to support the software applications.
As computing power increased, the operating systems supporting the software applications were able to increase in sophistication and complexity such that so-called multi-tasking environments were able to be supported. However, due to the complexity and variety of the software applications available, the use of a single hardware platform to support these software applications did not always provide consistency and stability of execution.
With the advent of virtualisation, an additional layer, a virtual machine environment, has been introduced in computer systems between the hardware platform and the operating system and the software applications. With this new layer, which supported multiple operating systems, came the additional advantage of the ability to partition the hardware into virtual systems such that the software of one virtual system executing within one partition is not permitted to influence the software executing in another partition of another virtual system. Furthermore, such computing systems exhibit very good stability such that where a computing system comprises multiple virtual machines, failure of one virtual machine does not necessarily result in failure of other virtual machines supported by the hardware platform. Additionally, legacy software applications, designed for a single core system and not designed to operate in a multicore environment or to cooperate with other software applications, can be supported in a virtual environment.
So-called virtualisation has now extended to the field of embedded computing systems, which find many applications, for example in the automotive industry. In a relatively straightforward implementation on a multi-core Microcontroller Unit (MCU), it is known to partition available resources of the MCU so that different virtual machines can be supported. In this simple example, each virtual machine, or guest, is supported by a respective processor core of the MCU. So, for example, a first virtual machine is supported by and dedicated to a first processor core and a second virtual machine is supported by and dedicated to a second processor core, respectively. A virtual machine monitor, sometimes referred to as a “hypervisor”, is functionally located between the virtual machines and non-dedicated hardware, for example memories or peripherals. The hypervisor serves to manage interaction between each virtual machine and underlying resources of the hardware platform, for example a peripheral.
However, when a peripheral has to be shared by virtual machines, so-called exceptions or “traps” are generated, which call or “trap into” the hypervisor to ensure the hypervisor can maintain control over such a non-dedicated resource. This results in a significant performance reduction by the virtual machines. Therefore, solutions are required that allow fast access from a host to one or more peripherals without dedicating them to the host.
US patent publication number US 2006/0195618 A1 relates to a data processing system, method and computer program product for the creation and initialisation of a virtual adapter on a physical adapter that supports virtual adapter level virtualisation. In this publication, a management system is described that can request peripherals to allocate resources to specific virtual machines. However, in the system described actual resources, for example configuration or I/O registers, exist to allow access of the virtual peripherals rather than only appear to exist, for example channels of an Analogue-to-Digital Converter (ADC).
US patent publication number US 2011/0119423 A1 relates to an assignment of resources in an I/O virtualisation system. Hardware described in this document is significantly extended to provide so-called full virtualised clones of hardware to core; interfaces and a management Central Processing Unit (CPU) are especially introduced. Thus the system does not provide for direct, unencumbered, access to peripherals, but instead all accesses are managed and thus slowed down.
US patent publication number US 2010/0162243 A1 relates to use of a memory management unit to switch between direct peripheral access and virtualisation. However, such a regime excludes access by other virtual machines to the peripheral when direct access of the virtual machine to the peripheral is provided. Alternatively, virtualised access to the peripheral is provided in which case the above-mentioned performance penalties apply.
US patent publication number US 2007/0192518 A1 relates to an apparatus for performing input/output sharing and virtualisation. The system described in this document uses a centralised management entity (a so-called IOSV processor) that is used for virtualisation of large I/O accesses, (for example using the Small Computer System Interface (SCSI) over TCP/IP). In such an environment, task switching overhead is insignificant compared to transmission and reaction times of the peripheral. Thus, the solution described is unsuitable for fast, direct, peripheral register access.